<template>
    <div>
        <el-dialog
            title="OCR录入"
            :visible.sync="dialogVisible"
            width="70%"
            :before-close="handleClose"
             :close-on-click-modal="false">
            <div>
                <el-row>
                    <el-col :span="24">
                        选择文件:
                        <input type="file" name="file" @change="getFile">
                        <el-button type="primary" @click="upload">上传</el-button>
                        <el-button type="primary" @click="read">提取</el-button>
                    </el-col>
                </el-row>
                <el-row style="margin-top: 20px" :gutter="20">
                    <el-col :span="12">
                        <div @click="dialogContractVisible = true">
                            pdf预览：
                            <pdf
                                ref="pdf"
                                :src="pdfUrl"
                                :page="1"
                            >
                            </pdf>
                        </div>
                    </el-col>
                    <el-col :span="12">
                        <div>
                            <room-table ref="roomTable" @close="close"></room-table>
                        </div>
                    </el-col>
                </el-row>
            </div>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisible = false">关闭</el-button>
                <el-button type="primary" @click="ok">确定</el-button>
            </span>
        </el-dialog>
    </div>
</template>

<script src="./ocr-add.js"></script>
<style scoped lang="scss">
    
    @include formWrap();
</style>
